import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-05-14
 * Time: 16:49
 */
class Rect {
    int x1,y1,x2,y2;  //4个属性,分别表示左下角和右上角的x、y坐标

    //构造方法
    public Rect(int x1, int y1, int x2, int y2) {
        this.x1 = x1;
        this.x2 = x2;
        this.y1 = y1;
        this.y2 = y2;
    }
    //判断点（x,y)是否在本矩形对象内部，在窗边的不计
    public boolean isInRect(int x,int y) {
        if (x <= x1 || x >= x2) {
            return false;
        }
        if(y <= y1 || y >= y2) {
            return false;
        }
        return true;
    }
}
class Point0 {
    double x;
    double y;
    public Point0(double x, double y) {
        this.x = x;
        this.y = y;
    }
    public double dist(Point0 p){
        return Math.sqrt(Math.pow(p.x - this.x, 2) + Math.pow(p.y - this.y, 2));
    }
}

class Cricle{
    double r;

    public Cricle(double r) {
        this.r = r;
    }
    public double length(){  //求圆的周长
//        System.out.println(3.14 * 2 * this.r);
        return Math.PI * 2 * this.r;
    }
}
class Fraction {
    int molecule;
    int denominator;
    public Fraction(int a, int b) {
        int c = gcd(a, b);
        a /= c;
        b /= c;
        this.molecule = a;
        this.denominator = b;
    }
    public double toDouble() {
        return molecule*1.0 / denominator;
    }
    public Fraction plus(Fraction r) {
        int a;
        int b;
        if(denominator == r.denominator) {
            b = denominator;
            a = molecule + r.molecule;
        } else {
            int c = gcd(denominator, r.denominator);
            b = denominator * r.denominator / c;
            a = b / denominator * molecule + b / r.denominator * r.molecule;
        }
        int c = gcd(a, b);
        a /= c;
        b /= c;
        return new Fraction(a, b);
    }
    public Fraction multiply(Fraction r) {
        int a = molecule * r.molecule;
        int b = denominator * r.denominator;
        int c = gcd(a, b);
        a /= c;
        b /= c;
        return new Fraction(a, b);
    }
    @Override
    public String toString() {
        if(molecule == 1 && denominator == 1) {
            return 1 + "";
        } else {
            if(molecule >= 0 && denominator < 0) {
                molecule = -molecule;
                denominator = -denominator;
            }
            return (molecule + "/" + denominator);
        }
    }
    private int gcd (int a, int b) {
        if(b == 0) {
            return a;
        } else {
            int tmp = a % b;
            a = b;
            b = tmp;
            return gcd(a, b);
        }
    }
}
class BankBusiness {
    public static String bankName = "中国银行";
    private String name;
    private String password;
    private double balance;
    public static void welcome() {
        System.out.println(bankName + "欢迎您的到来！");
    }
    public static void welcomeNext() {
        System.out.println("请收好您的证件和物品，欢迎您下次光临！");
    }
    public BankBusiness(String name, String password) {
        this.name = name;
        this.password = password;
    }
    public void deposit (String password0, double money) {
        if(password0.compareTo(this.password) != 0) {
            System.out.println("您的密码错误！");
        } else {
            this.balance += money;
            System.out.println("您的余额有" + this.balance + "元。");
        }
    }
    public void withdraw (String password0, double money) {
        if(password0.compareTo(this.password) != 0) {
            System.out.println("您的密码错误！");
        } else if (this.balance < money){
            System.out.println("您的余额不足！");
        } else {
            this.balance -= money;
            System.out.println("请取走钞票，您的余额还有" + this.balance + "元。");
        }
    }
}
public class HomeWork3 {
    public static void main(String[] args) {
        BankBusiness.welcome();
        Scanner scanner = new Scanner(System.in);
        BankBusiness account = new BankBusiness(scanner.next(), scanner.next());
        account.deposit(scanner.next(), scanner.nextDouble());
        account.withdraw(scanner.next(), scanner.nextDouble());
        account.withdraw(scanner.next(), scanner.nextDouble());
        account.withdraw(scanner.next(), scanner.nextDouble());
        BankBusiness.welcomeNext();
    }
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        Fraction a = new Fraction(in.nextInt(), in.nextInt());
        Fraction b = new Fraction(in.nextInt(), in.nextInt());
        System.out.println(a);
        System.out.println(b);
        System.out.println(a.plus(b));
        System.out.println(a.multiply(b).plus(new Fraction(5,6)));
        System.out.println(a);
        System.out.println(b);
        System.out.println(a.toDouble());
        in.close();
    }
    public static void main2(String[] args) {
        Scanner reader = new Scanner(System.in);
        int n = reader.nextInt();       //读取点的数量
        double r = reader.nextDouble();  //读取圆的半径
        Point0[] ps = new Point0[n];   //定义点的数组
        for(int i=0; i<n; i++){
            ps[i] = new Point0(reader.nextDouble(), reader.nextDouble());  //创建每个点对象
        }
        double dist = 0.0;
        int j;

        //求点之间的距离之和
        for(j=0; j<n-1; j++){
            dist += ps[j].dist(ps[j+1]);
        }
        dist += ps[j].dist(ps[0]);

        //累加圆的周长
        Cricle c = new Cricle(r);
        dist += c.length();

        //输出计算的长度
        System.out.printf("%.2f\n", dist);
    }
    public static void main1(String args[]) {
        int n,x,y;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext())
        {
            n = sc.nextInt();  //待考察的点数
            int count = 0;     //计数器
            Rect rect = new Rect(sc.nextInt(),sc.nextInt(),sc.nextInt(),sc.nextInt());  //构建矩形对象
            for(int i=0;i<n;i++)    //判断n个点是否在矩形对象rect中
            {
                x = sc.nextInt();   //读入待考察点的x坐标
                y = sc.nextInt();   //读入待考察点的y坐标
                boolean inRect = rect.isInRect(x, y);  //判断点(x,y)是否在矩形中
                if(inRect)    //是，计数器加1
                {
                    count++;
                }
            }
            System.out.println(count);    //打印N个点在矩形对象中的点的个数
        }
    }
}
